Skip to content

Claude engine: report and resume background agents cut off when claude -p exits - #20

Merged
Darknode-Official merged 1 commit into
mainfrom
fix/claude-bg-agents
Nov 8, 2026
Merged

Darknode-Official merged 1 commit into
mainfrom
fix/claude-bg-agents

Conversation

@Darknode-Official

Copy link
Copy Markdown
Owner

Claude engine: say so and resume when background agents get cut off

Nexus runs each message as claude -p. After Claude's reply, that process
keeps background agents going for about 10 minutes and then exits, which
stops them mid-task. The turn just ended and the agents showed as done,
so Nexus looked like it cut out at random.

  • lib/nexus/bg-cutoff.js tracks sub-agent events after the result; if the
    process closes with them in flight, the turn reports it.
  • Those agents now show as stopped, not done, with a plain notice.
  • Nexus resumes them automatically on the same Claude session, up to 6
    times per typed message (Esc stops it).
  • The claude engine is told about the limit and pointed at foreground
    agents or mcp__nexus__sessions for long work.

Nexus runs each message as `claude -p`. After Claude's reply, that process
keeps background agents going for about 10 minutes and then exits, which
stops them mid-task. The turn just ended and the agents showed as done,
so Nexus looked like it cut out at random.

- lib/nexus/bg-cutoff.js tracks sub-agent events after the result; if the
  process closes with them in flight, the turn reports it.
- Those agents now show as stopped, not done, with a plain notice.
- Nexus resumes them automatically on the same Claude session, up to 6
  times per typed message (Esc stops it).
- The claude engine is told about the limit and pointed at foreground
  agents or mcp__nexus__sessions for long work.
@Darknode-Official
Darknode-Official merged commit 94f9026 into main Nov 8, 2026
6 checks passed
@Darknode-Official
Darknode-Official deleted the fix/claude-bg-agents branch November 8, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant